package com.atguigu.headline.service.impl;

import com.atguigu.headline.dao.NewsUserDao;
import com.atguigu.headline.pojo.NewsUser;
import com.atguigu.headline.service.NewsUserService;
import com.atguigu.mymvc.annotation.Autowire;
import com.atguigu.mymvc.annotation.Service;

@Service
public class NewsUserServiceImpl implements NewsUserService {
    @Autowire
    NewsUserDao newsUserDao;
    @Override
    public NewsUser getUser(String newsUser) {
        return   newsUserDao.getUser(newsUser);
    }

    @Override
    public NewsUser getUserById(Integer fid) {

        return  newsUserDao.getUserById(fid);
    }

    @Override
    public NewsUser getUserByUserName(String username) {

        return   newsUserDao.getUserByUserName(username);
    }

    @Override
    public void add(NewsUser newsUser) {
        newsUserDao.add(newsUser);
    }
}

